import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)



//所有权限通用路由表
//如首页和登录页和一些不用权限的公用页面
export const constantRouterMap = [
  {
    path: '/',
    meta: { requiresAuth: false },
    redirect: '/login'
  },
  {
    path: '/login',
    meta: { requiresAuth: false },
    component: resolve => require(['components/page/Login'], resolve)
  },
  {
    path: '/list',
    meta: { requiresAuth: false },
    component: resolve => require(['components/page/List'], resolve)
  },
  {
    path: '/qrcode',
    meta: { requiresAuth: false },
    component: resolve => require(['components/page/qrcode'], resolve)
  },
  {
    path: '/main',
    meta: { requiresAuth: false },
    component: resolve => require(['components/page/Main'], resolve)
  },
  {
    path: '/info',
    meta: { requiresAuth: false },
    component: resolve => require(['components/page/Info'], resolve)
  }
];

export default new Router({
  mode: 'history',
  routes: constantRouterMap
})

